package com.factory;

import com.service.Impl.BallCgService;
import net.sf.cglib.proxy.Enhancer;

public class BallCgFactory {
    private static BallCgService callback = new BallCgService();

    public static <T> T creat(Class<T> ball){
        Enhancer enhancer = new Enhancer();
        enhancer.setCallback(callback);
        enhancer.setSuperclass(ball);
        return (T) enhancer.create();
    }
}
